Method for comparing points sets

ABSTRACT

In order to compare two two-dimensional sets of points (P 1 , P 2 , . . . , P 5 ; G 1 , G 2 , . . . G 5 ), an equation system is solved that can be obtained by generating a transformation equation for the first set of points with variable parameters and determining the values of the parameters for which the sum over all squared distances between the transformed points P i ′ of the first set and the assigned points G i  of the second set assumes a minimum, the values of the parameters obtained in this way being used as a measure of the similarity of the sets of points (P 1 , P 2 , . . . , P 5 ; G 1 , G 2 , . . . G 5 ).

FIELD OF THE INVENTION

The present invention relates to a method for comparing two-dimensionalsets of points.

BACKGROUND INFORMATION

A two-dimensional set of points may be understood to mean any type ofarrangement of objects or features on a plane. Methods for comparingcontinuous two-dimensional sets of points such as images or sections ofimages are known. In these methods, for example cross-correlationmethods (in the original range and the frequency range) are used to findmatches between a plurality of sets. These methods require a great dealof processing power, as large quantities of data must be processed;moreover, as a general rule these methods can only recognize a limitedrange of types of similarity. Thus, for example, if conventionalcross-correlation in Cartesian coordinates is applied to two imagesections, it is possible to calculate a translation vector by which oneof the two images must be shifted in order to superimpose it on thesecond with as great a similarity as possible; however, if Cartesiancross-correlation is used, it goes unnoticed that possibly greatersimilarity or even identity can be achieved by deforming, compressing orrotating an image. Vice versa, if cross-correlation in polar coordinatesis used, it is possible to determine whether two images can be convertedinto one another via compressing and rotating, but if in addition atranslation is required the similarity goes unnoticed.

SUMMARY OF THE INVENTION

The present invention constitutes a method for comparing two-dimensionalsets of points that makes it possible to recognize many different typesof similarity with very little processing power, and makes it possible,for example, to recognize that two sets of points are identical if onecan be created from the other via a combination of rotation, translationand compression or stretching. It was unanticipated that to accomplishthis it is simply necessary to assign exactly one point G_(i) of thesecond set to each point P_(i) of the first set and then to solve anequation system that can be obtained in the following way: first, atransformation equation P′_(i) =T(P_(i)) is generated for points P_(i)of the first set, transformation function T having a plurality ofvariable parameters a_(j), and the values of parameters a_(j) for whichthe sum over i of the squared distances between P′_(i) and G_(i) assumesa minimum are determined. The values of parameters a_(j) obtained inthis way are used as a measure of the similarity of the sets of points.Conventional methods of analysis can be used to determine the values ofparameters a_(j) that are to be found.

The method is particularly easy to use if each point P_(i), G_(i)respectively is represented by a complex number.

A method for comparing two-dimensional sets of points in whichtransformation function T is in the form of a polynomial is a preferredspecial case of the method according to the present invention. In thiscase, the values of parameters a_(i) for which the sum of the squareddistances apart assumes a minimum are indicated via equation system 1.$\begin{matrix}{\begin{pmatrix}{\sum\limits_{i}{G_{i}P_{i}^{n*}}} \\\vdots \\{\sum\limits_{i}{G_{i}P_{i}^{*}}} \\{\sum\limits_{i}G_{i}}\end{pmatrix} = {\begin{pmatrix}{\sum\limits_{i}{P_{i}^{n}P_{i}^{n*}}} & \cdots & {\sum\limits_{i}{P_{i}P_{i}^{n*}}} & {\sum\limits_{i}P_{i}^{n*}} \\\vdots & \quad & \vdots & \vdots \\{\sum\limits_{i}{P_{i}^{n}P_{i}^{*}}} & \cdots & {\sum\limits_{i}{P_{i}P_{i}^{*}}} & {\sum\limits_{i}P_{i}^{*}} \\{\sum\limits_{i}P_{i}^{n}} & \cdots & {\sum\limits_{i}P_{i}} & {\sum\limits_{i}1}\end{pmatrix}\begin{pmatrix}a_{n} \\\vdots \\a_{1} \\a_{0}\end{pmatrix}}} & (1)\end{matrix}$

Solving linear equation systems of this kind does not present anydifficulties and can be accomplished with the help of an appropriatelyprogrammed computer or microprocessor via a fully automated process.

In order to use the method for comparing images that include acontinuous set of points, it is sufficient to select a number ofcharacteristic points from each of the two images to be compared andthus to generate sets of points { . . . , P_(i), . . . }, { . . . ,G_(i), . . . } to which the method according to the present inventioncan be applied.

The selected points may involve, for example, the eyes, ears or otherpronounced points on the image of a face which may be marked by theperson performing operations, or they may also be determined via a fullyautomated process, so that the similarity between the person shown inthe image and a second image or collection of images can be determined.

Another important application is, for example, joining togetherpartially overlapping images, in particular maps. This problem arises inparticular with maps displayed electronically in modern vehiclenavigation systems. Navigation systems of this kind may have a set ofmaps of a region in which the driver of a motor vehicle may be moving,these maps partially overlapping but not transitioning continuously intoone another. If maps of this kind have been obtained from differentmanufacturers, there may be differences in the type of projection, thescale and the orientation, which may make it difficult for thenavigation system to switch from one map sheet to another. In suchcases, with the help of the method according to the present invention itis possible to select a set of pronounced points, such as roadintersections on one of the maps, to select a corresponding set in asecond map, and to assign each point of one set to exactly one point ofthe other set, a hypothesis as to which selected intersections maycorrespond to one another being generated, and a comparison then beingcarried out using the method according to the present invention. If thiscomparison does not yield a sufficient level of matching, a new set ofpoints is selected in one of the maps and a new comparison is carriedout, it being of course possible for the newly selected set of points tocontain elements of the previous set.

Further features and advantages of the present invention are given inthe description of exemplary embodiments below, with reference to thefigures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows two sets of points in a plane to which the method accordingto the present invention may be applied.

FIG. 2 is a first illustration of results from methods according to thepresent invention using polynomials of different orders.

FIG. 3 is a second illustration of results from methods according to thepresent invention using polynomials of different orders.

FIG. 4 is a third illustration of results from methods according to thepresent invention using polynomials of different orders.

DETAILED DESCRIPTION

FIG. 1 shows two sets of points P₁, . . . P₅ and G₁, . . . G₅; to helpshow they are associated with one another, each set is joined by a line;the points are plotted in a coordinate grid. Each of these points ischaracterized by two coordinate values, which in this case are conceivedas the real component and the imaginary component of a complex number.The real component and the imaginary component are plotted on theordinate and the abscissa of the coordinate system.

The points may each constitute the coordinates of pronounced locationson two maps such as road intersection or the like, these two maps beingstored in a navigation system of a motor vehicle; however, for example,points P₁ and P₅ could also constitute a series of positions of themotor vehicle determined with the help of a GPS system, and points G₁ toG⁵ could constitute the path of a road shown on a map in the navigationsystem.

In order to be able to decide whether both sets of points belong to thesame object, i.e. in this case whether they represent the same road, itis necessary to assess their similarity. To accomplish this,transformation T is sought which converts the set of points P_(i) intothe set of points P′_(i) for which the sum of the distance squares|P′_(i)-G_(i)|² is a minimum. This transformation T is in the form of apolynomial

P _(i) =T(P _(i))=a _(n) ·P ^(n) + . . . a ₂ ·P ² +a ₁ ·P+a ₀  (2)

Just as with points P_(i), coefficients a_(n) to a₀ are conceived ascomplex numbers. Herein, a₀ represents a straightforward shifttransformation, and a₁ represents a rotate/stretch transformation. Inview of the standard terminology used in electronics for characteristiccurve parameters, it is proposed that the quadratic coefficient a₂ bedesignated a “curve”, and the cubic coefficient a₃ be designated a“turn”.

The extremal requirement that the squares of the distance apart be aminimum can be written as $\begin{matrix} {\sum\limits_{i}{( {P_{i}^{\prime} - G_{i}} ) \cdot ( {P_{i}^{\prime} - G_{i}} )^{*}}}\Rightarrow{Min}  & (3)\end{matrix}$

Combining equations 2 and 3 results in the following equation:$\begin{matrix} {\sum\limits_{i}{( {{a_{n} \cdot P_{i}^{n}} + \ldots + {a_{2} \cdot P_{i}^{2}} + {a_{1} \cdot P_{i}} + a_{0} - G_{i}} ) \cdot ( {{a_{n} \cdot P_{i}^{n}} + \ldots + {a_{2} \cdot P_{i}^{2}} + {a_{1} \cdot P_{i}} + a_{0} - G_{i}} )^{*}}}\Rightarrow{Min}  & (4)\end{matrix}$

From this it is possible to obtain equation system (1) by generatingpartial derivatives$\frac{\partial}{\partial a_{j}^{*}},{j = 0},{1\quad \ldots}\quad,{n.}$

If it is assumed that sets of points P_(i) and G_(i) must be convertedinto one another via translation and rotation/stretching, i.e. viarotation and modification of the scale, it is sufficient to considerequation (1) for the case n=1. In this case the following equation isobtained after equation (4) has been simplified: $\begin{matrix} {\sum\limits_{i}{( {{a_{n} \cdot P_{i}^{n}} + a_{0} - G_{i}} ) \cdot ( {{a_{1} \cdot P_{i}} + a_{0} - G_{i}} )^{*}}}\Rightarrow{{Min}.}  & (5)\end{matrix}$

After partial derivatives $\frac{\partial}{\partial a_{0}^{*}}$

and $\frac{\partial}{\partial a_{1}^{*}}$

have been generated and equating to zero has been carried out, thefollowing equation system is obtained: $\begin{matrix}{\begin{pmatrix}{\sum\limits_{i}{G_{i} \cdot P_{i}^{*}}} \\{\sum\limits_{i}G_{i}}\end{pmatrix} = {\begin{pmatrix}{\sum\limits_{i}{P_{i} \cdot P_{i}^{*}}} & {\sum\limits_{i}P^{*}} \\{\sum\limits_{i}P_{i}} & {\sum\limits_{i}1}\end{pmatrix}\begin{pmatrix}a_{1} \\a_{0}\end{pmatrix}}} & (6)\end{matrix}$

Methods for solving this equation system are known and do not need to bedescribed in detail. As a solution the coefficients a₁, a₀ are obtainedwhich yield the transformation equation of the form

P=a ₁ ·P+a ₀

having the minimum error square.

Linear complex coefficient a₁ contains the angle of rotation (phase andargument) and the stretching and change of scale (amount) relative to G.Scalar coefficient a₀ indicates the translation. For the points shown inFIG. 1, calculation of the coefficients yielded the following results:

Coefficient Complex Value Amount Argument/° a1 0.9146 − 0.0209i 0.9148−1.3091 a0 2.1442 + 1.1495i 2.4329 28.1956

Thus the transformation that produces the greatest similarity betweensets of points P_(i) and G_(i) includes a 0.9-fold compression of setP_(i), rotation of −1.3° and a shift of 2.4 in the direction 28°. Theresult is shown in FIG. 2, the coordinate grid of FIG. 1 in which pointsP₁ to P₅ are embedded having also been transformed so as to make thetransformation clearer.

Calculating the value of the error square from equation (3) yields ameasure of the similarity of the two sets of points.

If this error square exceeds a predefined boundary value, this suggeststhe two sets of points do not correspond to one another, and a differentset of points from the map can be selected and the method applied onceagain thereto, until a modification is achieved that has an error squarewhich is so small that it is fair to assume there is a match between thesets of points that have been selected.

Transformation parameters which take into account curves and turns canbe found in an analogous manner to that described above. Thus, forexample, using a transformation involving a quadratic polynomialT(P_(i))=a₂P_(i) ²+a₁P_(i)+a₀ results in the following equation system:$\begin{matrix}{\begin{pmatrix}{\sum\limits_{i}{G_{i} \cdot P_{i}^{2}}} \\{\sum\limits_{i}{G_{i} \cdot P_{i}^{*}}} \\{\sum\limits_{i}G_{i}}\end{pmatrix} = {\begin{pmatrix}{\sum\limits_{i}{P_{i}^{2} \cdot P_{i}^{2*}}} & {\sum\limits_{i}{P_{i} \cdot P_{i}^{2*}}} & {\sum\limits_{i}P^{2*}} \\{\sum\limits_{i}{P_{i}^{2} \cdot P_{i}^{*}}} & {\sum\limits_{i}{P_{i} \cdot P_{i}^{*}}} & {\sum\limits_{i}P^{*}} \\{\sum\limits_{i}P_{i}^{2}} & {\sum\limits_{i}P_{i}} & {\sum\limits_{i}1}\end{pmatrix}\begin{pmatrix}a_{2} \\a_{1} \\a_{0}\end{pmatrix}}} & (12)\end{matrix}$

Solving this equation system yields the following results for the pointsP₁ to P₅ and G₁ to G₅ shown:

Coefficient Complex Value Amount Argument/° a2 0.0272 − 0.0113i 0.0295−22.5600 a1 0.8311 − 0.0945i 0.8365 −6.4869 a0 2.0826 + 1.1371i 2.372828.6345

A statement regarding the similarity may now be obtained, for example,via the ratio of the amount of quadratic coefficient a₂ to the amount oflinear coefficient a₁, i.e. via the non-linear part of thetransformation:$\frac{( a_{2} )}{( a_{1} )} = 0.035$

The result of the transformation is shown in FIG. 3, the transformationalso having been carried out on the coordinate grid of points P₁ to P₅,the result of which is deformed grid 2.

FIG. 4 shows the result of a transformation using cubic polynomial Thaving coefficients a₃, a₂, a₁, a₀ that have been optimized according tothe method described above. The coefficients are indicated in the tablebelow:

Coefficient Complex Value Amount Argument/° a3 −0.0048 − 0.0136i  0.0144 109.4400 a2 0.1109 − 0.0219i 0.1130 −11.1708 a1 0.8353 − 0.1845i0.8554 −124554 a0 2.0541 + 0.9899i 2.2802 25.7301

Herein, it is important to note that when the error amount square methodis used, for each higher order of modification, new values of theindividual coefficients are produced, and the sum of the error squaresbecomes smaller and smaller the more optimizable coefficients are used.Therefore the change in a coefficient associated with the transition tothe next higher modification level may also be used as a measure of thesimilarity.

What is claimed is:
 1. A method for joining partially overlapping imagesin which a first two-dimensional set of points from one of the imagesand a second two-dimensional set of points from another of the imagesare compared with one another, comprising the steps of: representingeach point as a complex number; assigning exactly one point of thesecond set of points unambiguously and invertably to each individualpoint of the first set of points; and solving an equation system thatcan be obtained by generating a transformation equation for the firstset of points with variable parameters of a transformation function anddetermining values of the variable parameters for which a sum over allsquared values of a distance between a transformed point of the firstset of points and a corresponding point of the second set of pointsassumes a minimum, the values of the variable parameters serving as ameasure of a similarity of the first set of points and the second set ofpoints.
 2. The method according to claim 1, wherein: the partiallyoverlapping images include maps.
 3. A method for joining partiallyoverlapping images in which a first two-dimensional set of points fromone of the images and a second two-dimensional set of points fromanother of the images are compared with one another, comprising thesteps of: representing each point as a complex number; assigning exactlyone point of the second set of points unambiguously and invertably toeach individual point of the first set of points; and solving theequation system $\begin{matrix}{\begin{pmatrix}{\sum\limits_{i}{G_{i}P_{i}^{n*}}} \\\vdots \\{\sum\limits_{i}{G_{i}P_{i}^{*}}} \\{\sum\limits_{i}G_{i}}\end{pmatrix} = {\begin{pmatrix}{\sum\limits_{i}{P_{i}^{n}P_{i}^{n*}}} & \cdots & {\sum\limits_{i}{P_{i}P_{i}^{n*}}} & {\sum\limits_{i}P_{i}^{n*}} \\\vdots & \quad & \vdots & \vdots \\{\sum\limits_{i}{P_{i}^{n}P_{i}^{*}}} & \cdots & {\sum\limits_{i}{P_{i}P_{i}^{*}}} & {\sum\limits_{i}P_{i}^{*}} \\{\sum\limits_{i}P_{i}^{n}} & \cdots & {\sum\limits_{i}P_{i}} & {\sum\limits_{i}1}\end{pmatrix}\begin{pmatrix}a_{n} \\\vdots \\a_{1} \\a_{0}\end{pmatrix}}} & (1)\end{matrix}$

 the values of parameters a₀, a₁, . . . serving as a measure of asimilarity of the first set of points and the second set of points. 4.The method according to claim 3, wherein: the partially overlappingimages include maps.
 5. The method according to claim 3, wherein: anumber of points of one of the first set of points and the second set ofpoints is greater than a number of the parameters.
 6. The methodaccording to claim 3, wherein: a number of the parameters is smallerthan
 5. 7. A method for assessing a similarity of two images, comprisingthe steps of: a) selecting a number of characteristic points from eachimage to generate sets of points; b) representing each point as acomplex number; c) assigning exactly one point of a first set of pointsunambiguously and invertably to each individual point of a second set ofpoints; and d) solving an equation system that can be obtained bygenerating a transformation equation for the first set of points withvariable parameters of a transformation function and determining thevalues of the variable parameters for which a sum over all squaredvalues of a distance between a transformed point of the first set ofpoints and a corresponding point of the second set of points assumes aminimum, the values of the variable parameters serving as a measure of asimilarity of the first set of points and the second set of points. 8.The method according to claim 7, further comprising the step of:repeating steps a) to d) a plurality of times, a first one of the imagesremaining the same and a second one of the images being switched betweenrepetitions so that the image that is most similar to the first imagecan be found from a plurality of images used as the second image.
 9. Themethod according to claim 7, further comprising the steps of: repeatingsteps a) to d) a plurality of times; and between repetitions, modifyingat least one element of at least one of the first set of points and thesecond set of points.